package fx;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

public class Demo {
    public static void main(String[] args) throws Exception {
        List<String> list=new ArrayList();
        list.add("1");
        list.add("213");
        list.add("");


        Method method=list.getClass().getDeclaredMethod("add",Object.class);
        method.invoke(list,new Object());
        method.invoke(list,123);
        System.out.print(list);
    }
}
